package file;

import java.io.*;
import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) throws IOException {
        PrintWriter pw=new PrintWriter(new BufferedWriter(
                new OutputStreamWriter(
                        new FileOutputStream("pw.txt")
                )
        ),true
        );

        pw.println("hello");

        pw.close();
        FileOutputStream fos=new FileOutputStream("data.txt");
        fos.write(5);


    }


}
